package com.example.dllo.moondog.information.exercise;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import com.example.dllo.moondog.R;
import com.example.dllo.moondog.base.BaseActivity;

/**
 * Created by dllo on 16/3/3.
 */
public class ExerciseActivity extends BaseActivity {
    private WebView webView;
    private String id = "http://qt.qq.com/static/pages/news/phone/";


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_exercise);
        Intent intent = getIntent();
        String url2 = intent.getStringExtra("url_exe");
        String url = id + url2;
        webView = (WebView) findViewById(R.id.webView_exercise);
        webView.getSettings().setJavaScriptEnabled(true);
        webView.setWebViewClient(new WebViewClient() {
            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url) {
                view.loadUrl(url);
                return true;
            }
        });
        webView.loadUrl(url);
    }
}

